<nav>      
<?php use_stylesheet('bootstrap.css') ?>
<?php use_stylesheet('bootstrap-select.css') ?>
<?php use_stylesheet('bootstrap-theme.css') ?>    

<?php use_javascript('bootstrap.js') ?>
<?php include_partial('menu');?>   
</nav>
<article id="contenedorPais">    
<table class="table table-condensed">
  <thead>      
    <tr>
        <th colspan="7"><h2 id="titulo_form">CONVOCATORIAS DISPONIBLES</h2></th>
    </tr>
    <tr>            
      <th>Logo  </th>
      <th>Nombre</th>      
      <th>Fecha de cierre</th>
      <th>Universidad que ofrece</th>
      <th>Eliminar</th>
      <th>Informaci&oacute;n</th>
    </tr>
  </thead>
  <tbody>
<?php foreach ($becas->getResults() as $beca):?>
        <?php if (($beca['valor'] > 0) && ($beca['valor'] <= 5)): ?>           
            <tr class="success">
                <td><?php echo image_tag('/uploads/logos/'.$beca->getLogo(), 'id=img_logo', 'alt=logo'.$beca->getId()) ?></td>
                <td><a id="nombre_beca" href="<?php echo url_for('becas_aplicables/show?id='.$beca->getId()) ?>"><?php echo $beca->getNombre() ?></a></td>            
                <td><?php echo $beca->getFechaFin() ?></td>      
                <td><?php echo $beca->getEntidad()->getNombre()?></td>      
                <td><input type='checkbox' name='becas[]' value='<?php echo $beca->getId()?>'/></td>      
                <td><?php echo "Faltan ".$beca['valor']." d&iacute;as para que cierre esta convocatoria";?></td>
            </tr>
            <?php elseif($beca['valor'] > 5): ?>           
            <tr class="info">
                <td><?php echo image_tag('/uploads/logos/'.$beca->getLogo(), 'id=img_logo', 'alt=logo'.$beca->getId()) ?></td>
                <td><a id="nombre_beca" href="<?php echo url_for('becas_aplicables/show?id='.$beca->getId()) ?>"><?php echo $beca->getNombre() ?></a></td>            
                <td><?php echo $beca->getFechaFin() ?></td>      
                <td><?php echo $beca->getEntidad()->getNombre()?></td>      
                <td><input type='checkbox' name='becas[]' value='<?php echo $beca->getId()?>'/></td>      
                <td><?php echo "Faltan ".$beca['valor']." d&iacute;as para que cierre esta convocatoria";?></td>
            </tr>
            <?php elseif($beca['valor'] == 0): ?>           
            <tr class="danger">
                <td><?php echo image_tag('/uploads/logos/'.$beca->getLogo(), 'id=img_logo', 'alt=logo'.$beca->getId()) ?></td>
                <td><?php echo $beca->getNombre() ?></td>            
                <td><?php echo $beca->getFechaFin() ?></td>      
                <td><?php echo $beca->getEntidad()->getNombre()?></td>      
                <td><input type='checkbox' name='becas[]' value='<?php echo $beca->getId()?>'/></td>      
                <td><?php echo "Faltan ".$beca['valor']." d&iacute;as para que cierre esta convocatoria";?></td>
            </tr>
        <?php endif;?> 
    <?php endforeach;?>
  </tbody>
  <tfoot>
  <tr>            
   <td colspan="6"><?php include_partial('paginacion', array('becas'=> $becas)) ?></td>
  </tr>  
  </tfoot>
  </table>
</article>
<footer>    
</footer>